﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace EBA.IoC
{
    public class AutowiredConstructor
    {
        public AutowiredConstructor(ConstructorInfo constructor)
        {
            this.Constructor = constructor;

            var parameters = this.Constructor.GetParameters();
            this.Parameters = new Dictionary<string,AutowiredParameter>();

            foreach (var parameter in parameters)
            {
                this.Parameters.Add(parameter.Name, new AutowiredParameter(parameter));
            }
        }
        public ConstructorInfo Constructor { get; internal set; }

        public Dictionary<string, AutowiredParameter> Parameters { get; internal set; }
    }
}
